package 设计模式.chainofres;

/**
 * @功能
 * @创建时间 2020/5/4
 */
public class Client {
    public static void main(String[] args) {
        Leader a = new Director("张三");
        Leader b = new Manager("李四");
        Leader c = new GeneralManager("王五");
        a.setNextLeader(b);
        b.setNextLeader(c);
        a.handleRequest(new LeaveRequest("吃饱了",20,"肚子疼"));
        a.handleRequest(new LeaveRequest("喝足了",5,"肚子疼"));
        a.handleRequest(new LeaveRequest("睡够了",2,"肚子疼"));
    }
}
